<?php

namespace app\validate;

use think\Validate;

class OutsourcingOrderValidate extends Validate
{
    protected $rule = [
        'vendors_id' => 'require',
        'dingdan_id' => 'require',
        'material' => 'require|array',
        'ids' => 'require|array'
    ];

    protected $message = [
        'vendors_id' => '请选择外协企业',
        'dingdan_id' => '请选择订单',
        'material' => '请选择物料',
        'ids' => '请选择要分配的订单'
    ];

    protected $scene = [
        'add' => ['dingdan_id', 'material'],
        'assignOrder' => ['ids', 'vendors_id'],
    ];
}